home *** CD-ROM | disk | FTP | other *** search
- /* UserItem.c
- * Handy utilities for manipulating user items.
- * Copyright ©1997 Crawford Software Consulting. All Rights Reserved.
- * 19 Jan 97 Mike Crawford crawford@scruznet.com http://www.scruznet.com/~crawford/
- *
- * Get the Word Services Software Development Kit from http://www.wordservices.org/
- */
-
- #include "UserItem.h"
-
- void InstallUserItemProc( DialogPtr dlg, short item, ProcPtr userProc )
- {
- short kind;
- Handle h;
- Rect r;
- UserItemUPP proc;
-
- GetDItem( dlg, item, &kind, &h, &r );
-
- proc = NewUserItemProc( userProc );
- if ( !proc )
- return; // STUB should report an error
-
-
- SetDItem( dlg, item, kind, (Handle)proc, &r );
-
- return;
- }
-
- void DestroyUserItemProc( DialogPtr dlg, short item )
- {
- short kind;
- Handle h;
- Rect r;
-
- #ifdef GENERATINGCFM
- GetDItem( dlg, item, &kind, &h, &r );
-
- DisposeRoutineDescriptor( (UniversalProcPtr)h );
- #endif
- return;
- }
-